package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    /**
     * 新增菜品口味
     * @param flavors
     */
    void save(List<DishFlavor> flavors);

    /**
     * 删除菜品口味
     * @param dishIds
     */
    void deleteByDishId(List<Long> dishIds);

    /**
     * 查询菜品口味
     * @param dishId
     * @return
     */
    @Select("select *from sky_take_out.dish_flavor where dish_id=#{dishId}")
    List<DishFlavor> getByDishId(Long dishId);
}
